import request from '@/utils/request'

// 创建门店
export function createStorage(data) {
  return request({
    url: '/base/storage/create',
    method: 'post',
    data: data
  })
}

// 更新门店
export function updateStorage(data) {
  return request({
    url: '/base/storage/update',
    method: 'put',
    data: data
  })
}

// 删除门店
export function deleteStorage(id) {
  return request({
    url: '/base/storage/delete?id=' + id,
    method: 'delete'
  })
}

// 获得门店
export function getStorage(id) {
  return request({
    url: '/base/storage/get?id=' + id,
    method: 'get'
  })
}

// 获得门店分页
export function getStoragePage(params) {
  return request({
    url: '/base/storage/page',
    method: 'get',
    params
  })
}
// 导出门店 Excel
export function exportStorageExcel(params) {
  return request({
    url: '/base/storage/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}